package com.hinotoyk.testsystem.entity;

import java.util.ArrayList;
import java.util.List;

public class TestPaperInfoExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public TestPaperInfoExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andTestPaperIdIsNull() {
            addCriterion("test_paper_id is null");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdIsNotNull() {
            addCriterion("test_paper_id is not null");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdEqualTo(Integer value) {
            addCriterion("test_paper_id =", value, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdNotEqualTo(Integer value) {
            addCriterion("test_paper_id <>", value, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdGreaterThan(Integer value) {
            addCriterion("test_paper_id >", value, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("test_paper_id >=", value, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdLessThan(Integer value) {
            addCriterion("test_paper_id <", value, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdLessThanOrEqualTo(Integer value) {
            addCriterion("test_paper_id <=", value, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdIn(List<Integer> values) {
            addCriterion("test_paper_id in", values, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdNotIn(List<Integer> values) {
            addCriterion("test_paper_id not in", values, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdBetween(Integer value1, Integer value2) {
            addCriterion("test_paper_id between", value1, value2, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperIdNotBetween(Integer value1, Integer value2) {
            addCriterion("test_paper_id not between", value1, value2, "testPaperId");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameIsNull() {
            addCriterion("test_paper_name is null");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameIsNotNull() {
            addCriterion("test_paper_name is not null");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameEqualTo(String value) {
            addCriterion("test_paper_name =", value, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameNotEqualTo(String value) {
            addCriterion("test_paper_name <>", value, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameGreaterThan(String value) {
            addCriterion("test_paper_name >", value, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameGreaterThanOrEqualTo(String value) {
            addCriterion("test_paper_name >=", value, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameLessThan(String value) {
            addCriterion("test_paper_name <", value, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameLessThanOrEqualTo(String value) {
            addCriterion("test_paper_name <=", value, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameLike(String value) {
            addCriterion("test_paper_name like", value, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameNotLike(String value) {
            addCriterion("test_paper_name not like", value, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameIn(List<String> values) {
            addCriterion("test_paper_name in", values, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameNotIn(List<String> values) {
            addCriterion("test_paper_name not in", values, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameBetween(String value1, String value2) {
            addCriterion("test_paper_name between", value1, value2, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperNameNotBetween(String value1, String value2) {
            addCriterion("test_paper_name not between", value1, value2, "testPaperName");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailIsNull() {
            addCriterion("test_paper_detail is null");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailIsNotNull() {
            addCriterion("test_paper_detail is not null");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailEqualTo(String value) {
            addCriterion("test_paper_detail =", value, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailNotEqualTo(String value) {
            addCriterion("test_paper_detail <>", value, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailGreaterThan(String value) {
            addCriterion("test_paper_detail >", value, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailGreaterThanOrEqualTo(String value) {
            addCriterion("test_paper_detail >=", value, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailLessThan(String value) {
            addCriterion("test_paper_detail <", value, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailLessThanOrEqualTo(String value) {
            addCriterion("test_paper_detail <=", value, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailLike(String value) {
            addCriterion("test_paper_detail like", value, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailNotLike(String value) {
            addCriterion("test_paper_detail not like", value, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailIn(List<String> values) {
            addCriterion("test_paper_detail in", values, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailNotIn(List<String> values) {
            addCriterion("test_paper_detail not in", values, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailBetween(String value1, String value2) {
            addCriterion("test_paper_detail between", value1, value2, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andTestPaperDetailNotBetween(String value1, String value2) {
            addCriterion("test_paper_detail not between", value1, value2, "testPaperDetail");
            return (Criteria) this;
        }

        public Criteria andCourseIdIsNull() {
            addCriterion("course_id is null");
            return (Criteria) this;
        }

        public Criteria andCourseIdIsNotNull() {
            addCriterion("course_id is not null");
            return (Criteria) this;
        }

        public Criteria andCourseIdEqualTo(Integer value) {
            addCriterion("course_id =", value, "courseId");
            return (Criteria) this;
        }

        public Criteria andCourseIdNotEqualTo(Integer value) {
            addCriterion("course_id <>", value, "courseId");
            return (Criteria) this;
        }

        public Criteria andCourseIdGreaterThan(Integer value) {
            addCriterion("course_id >", value, "courseId");
            return (Criteria) this;
        }

        public Criteria andCourseIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("course_id >=", value, "courseId");
            return (Criteria) this;
        }

        public Criteria andCourseIdLessThan(Integer value) {
            addCriterion("course_id <", value, "courseId");
            return (Criteria) this;
        }

        public Criteria andCourseIdLessThanOrEqualTo(Integer value) {
            addCriterion("course_id <=", value, "courseId");
            return (Criteria) this;
        }

        public Criteria andCourseIdIn(List<Integer> values) {
            addCriterion("course_id in", values, "courseId");
            return (Criteria) this;
        }

        public Criteria andCourseIdNotIn(List<Integer> values) {
            addCriterion("course_id not in", values, "courseId");
            return (Criteria) this;
        }

        public Criteria andCourseIdBetween(Integer value1, Integer value2) {
            addCriterion("course_id between", value1, value2, "courseId");
            return (Criteria) this;
        }

        public Criteria andCourseIdNotBetween(Integer value1, Integer value2) {
            addCriterion("course_id not between", value1, value2, "courseId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdIsNull() {
            addCriterion("teacher_id is null");
            return (Criteria) this;
        }

        public Criteria andTeacherIdIsNotNull() {
            addCriterion("teacher_id is not null");
            return (Criteria) this;
        }

        public Criteria andTeacherIdEqualTo(Integer value) {
            addCriterion("teacher_id =", value, "teacherId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdNotEqualTo(Integer value) {
            addCriterion("teacher_id <>", value, "teacherId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdGreaterThan(Integer value) {
            addCriterion("teacher_id >", value, "teacherId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("teacher_id >=", value, "teacherId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdLessThan(Integer value) {
            addCriterion("teacher_id <", value, "teacherId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdLessThanOrEqualTo(Integer value) {
            addCriterion("teacher_id <=", value, "teacherId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdIn(List<Integer> values) {
            addCriterion("teacher_id in", values, "teacherId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdNotIn(List<Integer> values) {
            addCriterion("teacher_id not in", values, "teacherId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdBetween(Integer value1, Integer value2) {
            addCriterion("teacher_id between", value1, value2, "teacherId");
            return (Criteria) this;
        }

        public Criteria andTeacherIdNotBetween(Integer value1, Integer value2) {
            addCriterion("teacher_id not between", value1, value2, "teacherId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}